import Vue from 'vue'
import App from './App.vue'
import Vuex from 'vuex'
import store from './store'
import axios from "axios";
// import ElementUI from 'element-ui';

import {Icon, Tooltip, Upload, Alert, Button, ButtonGroup ,MessageBox, Message,
  Form, FormItem, Input, Dialog, Tabs, TabPane, Menu, Submenu, MenuItem,
  Checkbox, Radio, RadioGroup, Slider, Card, Switch, Steps, Step, Drawer,
  Popover, Badge} from 'element-ui';

// Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.use(Vuex)

Vue.use(Icon)
Vue.use(Tooltip)
Vue.use(Upload)
Vue.use(Alert)
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Dialog)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(Checkbox)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Slider)
Vue.use(Card)
Vue.use(Switch)
Vue.use(Steps)
Vue.use(Step)
Vue.use(Drawer)
Vue.use(Popover)
Vue.use(Badge)

Vue.prototype.$alert = (msg, title) => MessageBox.alert(msg, title, {
  type: 'error', center: true, roundButton: true, showClose: false,
});
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$message = Message;

axios.defaults.timeout = 6e4;
Vue.prototype.$axios = axios;

new Vue({
  render: h => h(App),
  store,
  beforeCreate() {
    Vue.prototype.$bus = this;
  }
}).$mount('#app')
